package com.yidu.hbatsams.dao;

import com.yidu.hbatsams.domain.AtsPlanCurriculum;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface AtsPlanCurriculumMapper {
    /**
     *课计划
     *
     * @return
     */
    List<AtsPlanCurriculum> selectAll(AtsPlanCurriculum atsPlanCurriculum);
    List<AtsPlanCurriculum> findAll(AtsPlanCurriculum atsPlanCurriculum);
    List<AtsPlanCurriculum> findAthlete(AtsPlanCurriculum atsPlanCurriculum);
    List<AtsPlanCurriculum> findCoach(AtsPlanCurriculum atsPlanCurriculum);
    /**
     * 查询总行数
     *
     * @param atsPlanCurriculum
     * @return
     */
    int countAll(AtsPlanCurriculum atsPlanCurriculum);
    int countCurAll(AtsPlanCurriculum atsPlanCurriculum);
    int countAthlete(AtsPlanCurriculum atsPlanCurriculum);
    int countCoach(AtsPlanCurriculum atsPlanCurriculum);

    /**
     * 课多折线统计图
     *
     * @return
     */
    List<AtsPlanCurriculum> curEchar(Map<String, Object> map);
    List<AtsPlanCurriculum> curEcharCoach(Map<String, Object> map);
    List<AtsPlanCurriculum> curEcharAthlete(Map<String, Object> map);
    List<AtsPlanCurriculum> curEcharAll(Map<String, Object> map);
    /**
     * 周多折线统计图
     *
     * @return
     */
    List<AtsPlanCurriculum> weekEchar(Map<String, Object> map);
    List<AtsPlanCurriculum> weekEcharCoach(Map<String, Object> map);
    List<AtsPlanCurriculum> weekEcharAthlete(Map<String, Object> map);
    List<AtsPlanCurriculum> weekEcharAll(Map<String, Object> map);

    List<AtsPlanCurriculum> curAthletePie(Map<String, Object> map);
    List<AtsPlanCurriculum> curAllPie(Map<String, Object> map);
    List<AtsPlanCurriculum> curCoachPie(Map<String, Object> map);





    /**
     * 主键查询
     *
     * @param curriculumId
     * @return
     */
    AtsPlanCurriculum findById(Integer curriculumId);
    /**
     * 删除
     *
     * @param weekId
     * @return
     */
    int isvaDel(Integer weekId);

    AtsPlanCurriculum findByWeekId(int weekId);

    AtsPlanCurriculum selectByIsvaTwo(Integer weekId);



    /**
     * 查询课计划名称是否存在
     * @return
     */
    int countFive(AtsPlanCurriculum atsPlanCurriculum);

    int selectWeekcount();

    int updateZancunIsva(AtsPlanCurriculum atsPlanCurriculum);

    /**
     * 外键查询
     *
     * @param weekId
     * @return
     */
    List<AtsPlanCurriculum> findByWeekId(Integer weekId);




    /**
     * 修改是否有效
     *
     * @param atsPlanCurriculum
     * @return
     */
    int updateIsva(AtsPlanCurriculum atsPlanCurriculum);


    /**
     * id查询
     *
     * @param curriculumId
     * @return
     */
    AtsPlanCurriculum findByIdTwo(Integer curriculumId);

    AtsPlanCurriculum findMaxPid(int coachId);

    /**
     * @mbg.generated 2019-10-29
     */
    int deleteByPrimaryKey(Integer curriculumId);

    /**
     * @mbg.generated 2019-10-29
     */
    int insert(AtsPlanCurriculum record);

    /**
     * @mbg.generated 2019-10-29
     */
    int insertSelective(AtsPlanCurriculum record);

    /**
     * @mbg.generated 2019-10-29
     */
    AtsPlanCurriculum selectByPrimaryKey(Integer curriculumId);


    List<AtsPlanCurriculum> selectByDate(String planDate, Integer coachId);

    List<AtsPlanCurriculum> selectCurricu(int weekId);



    /**
     * @mbg.generated 2019-10-29
     */
    int updateByPrimaryKey(AtsPlanCurriculum record);

    /**
     * 根据周的id查询最大的课计划
     * @param weekId
     * @return
     */
    AtsPlanCurriculum selectMaxcurruculum(Integer weekId);


}